1. Field
Apparatuses and methods consistent with exemplary embodiments relate to encoding and decoding a video accompanied by transformation and inverse transformation.
2. Description of the Related Art
As hardware for reproducing and storing high resolution or high quality video content is being developed and supplied, a need for a video codec for effectively encoding or decoding the high resolution or high quality video content is increasing. In a related art video codec, a video is encoded according to a limited encoding method based on a macroblock having a predetermined size.
Image data in a spatial domain is converted into coefficients in a frequency domain by using frequency transformation. In a video codec, an image is split into blocks having a predetermined size and discrete cosine transform (DCT) is performed on each block to encode frequency coefficients in a block unit so as to quickly perform frequency transformation. The coefficients in the frequency domain are easily compressed compared to the image data in the spatial domain. In particular, since an image pixel value in the spatial domain is expressed in a prediction error via inter prediction or intra prediction of the video codec, a large amount of data may be converted to 0 when frequency transformation is performed on the prediction error. The video codec replaces data that continuously and repeatedly occurs by data having a small size, thereby reducing an amount of data.